export default function() {
	const param = {};
	if (env === 'react-antd') {
		param.title = '各种输入框'
	} else {
		param.header = '各种输入框'
		param.formParam = { labelWidth: '108px' }
	}

	const area = this.area(param);
	// 每一次的add会构建一个单独
	area.add(
		$Input({
			$name: 'name',
			$label: '姓名'
		}),
		$InputNumber({
			$name: 'age',
			$label: '年龄'
		})
	);

	if (env === 'react-antd') {
		area.add(
			$Input({
				addonBefore: 'https:',
				prefix: '//',
				suffix: '.',
				addonAfter: 'com',
				defaultValue: 'mysite',
				$name: 'web-site',
				$label: '搜索框'
			}),
			$Search({
				$name: 'search-text',
				$label: '搜索框'
			}),
			$Password({
				$name: 'password',
				$label: '密码框'
			}),
			$Autocomplete({
				$name: 'autocomplete',
				$label: 'Autocomplete',
				options: [
					{ label: '选项1', value: 1 },
					{ label: '选项2', value: 2 },
				]
			}),
			$TextArea({
				$name: 'content',
				$label: '文本域',
				$span: 24
			})
		)
	} else {
		// 由于vue2和vue3中插槽的巨大差异
		// 所以示例中按照环境使用各自插槽
		if (env === 'vue2-element') {
			area.add(
				$Input({
						$label: '搜索框',
						// $name: 'web-site',
						$name: {
							config: [{
								inputField: 'web-site',
								inputDone: v => 'mysite'
							}]
						}
					},
					[
						this.render({ slot: 'prepend' }, 'https://'),
						this.render({ slot: 'append' }, '.com')
					]
				)
			)
		} else if (env === 'vue3-element') {
			area.add(
				$Input({
					// $name: 'web-site',
					$name: {
						config: [{
							inputField: 'web-site',
							inputDone: v => 'mysite'
						}]
					},
					$label: '搜索框',
					$slots: {
						prepend: () => 'https://',
						append: () => '.com'
					}
				})
			)
		}

		area.add(
			$Input({
				$name: 'content',
				$label: '文本域',
				type: 'textarea'
			}),
			$Autocomplete({
				$name: 'autocomplete',
				$label: 'Autocomplete',
				'fetch-suggestions': (queryString, cb) => {
					cb(
						[
							{ value: '选项1', link: 1 },
							{ value: '选项2', link: 2 },
						]
					)
				}
			})
		)
	}

	// 元素添加完毕，确定渲染
	const action = area.done();
}